using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Sustainalytics.DynamicsCRMGateway
{
    [Serializable]
    public class CrmRequestException : Exception
    {
        public CrmRequestException()
        {
        }

        public CrmRequestException(string message, Dictionary<string, object> requestParameters)
            : base(message)
        {
            RequestParameters = requestParameters;
        }

        public CrmRequestException(string message, Exception inner)
            : base(message, inner)
        {
        }

        protected CrmRequestException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        public Dictionary<string, object> RequestParameters { get; set; }
    }
}
